<template>
	<view class="home">
		<Navbar></Navbar>
		<SpotList></SpotList>
	</view>
</template>

<script>
	//加载顶部导航搜索栏 1、引用组件
	import Navbar from "../../../uni_modules/navbar/navbar.vue"
	import SpotList from "../../../uni_modules/spot/spot_list.vue"
	import httpTypes from '@/js/http-types.js'
	
	export default {	
		data() {
			return {
				spotId:''
			}
		},	
		methods: {
			
		},
		onLoad:function(option){
			this.spotId = option.id;
			console.log(option.id)
		},
		mounted() {
			//通过 uni.request 做网络请求
			httpTypes.request({
				url: 'admin/spot/getSpot/xihu',//接口地址
				method:'GET',
				success:(res) => {
					
				}
			});
		},
		//加载顶部导航搜索栏 2、组件注入的形式Navbar
		components:{
			Navbar,
			SpotList,
		}//
	}
</script>

<style lang="scss">
	body{
		background-color: #F8F8F8;
	}
</style>
